package top.aigoo.project01.service;

import top.aigoo.project01.entity.ProductCategory;
import top.aigoo.project01.entity.dto.ProductCategoryExecution;

import java.util.List;

/**
 * @Description: 商品分类
 * @Author: Mr.OYSHUO.欧阳大叔  mail:1642302522@qq.com
 * @Version 1.0.0
 * @Date: 2021/8/25 22:09
 */
public interface ProductCategoryService {

    /**
     * 根据shopid查询该shopId下的产品分类
     */
    ProductCategoryExecution queryByShopId(long shopId);

    /**
     * 批量添加分类
     */
    ProductCategoryExecution batchAddProductCategory(List<ProductCategory> productCategoryList) throws RuntimeException;

    /**
     * 删除分类，并将此类别下的商品里的类别id设置为空，再删除掉该商品类别
     *
     * @param productCategoryId
     * @param shopId
     * @return
     * @throws RuntimeException
     */
    ProductCategoryExecution deleteProductCategory(long productCategoryId,
                                                   long shopId) throws RuntimeException;

    /**
     * 查询指定某个店铺下的所有商品类别信息
     *
     * @param shopId long
     * @return ist<ProductCategory>
     */
    List<ProductCategory> getByShopId(long shopId);
}
